import request from '@u/request.js'

// 根据订单id获取订单详情
export function getOrderDetail(id) {
  return request({
    url: `/order/api/order/getDetailById/${id}`,
    method: 'get'
  })
}

// 发货
export function orderShip(data) {
  return request({
    url: '/order/api/order/orderShip',
    method: 'post',
    data
  })
}

// 收货
export function orderReceive(data) {
  return request({
    url: '/order/api/order/orderReceive',
    method: 'post',
    data
  })
}

// 异常处理
export function orderException(data) {
  return request({
    url: '/order/api/order/orderException',
    method: 'post',
    data
  })
}

// 订单导出
export function orderExport(data) {
  return request({
    url: '/order/api/order/export',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
